package com.client.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.client.pojo.Post;
import com.client.pojo.History;
import com.client.service.HistoryService;

@Controller
public class Historycontroller {
	
	 @Autowired
	 private HistoryService historyService;
	
	 @RequestMapping("send")
	 public void sendTitle(int userid){
		String type=historyService.selectType(userid);
		System.out.println(type);
		sendPost(type);

	}
	 public List<Post> sendPost(String type){
		   if(type==null){
	   List<Post> postlist=historyService.selectfristPost(type);
		   }
		   else{
	   List<Post> postlist=historyService.selectPost(type);
	  
			   }
		 return null;
	 
	 }
	 
	 
	

}
